<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>盒子居中</title>
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<style type="text/css">
		.top_bar{
			width: 100%;
			height: 40px;
			background-color: #333;
		}
		.container{
			width: 1200px;
			height: 100%;
			background-color: red;
			/*margin-left:  auto;*/
			/*margin-right: auto;*/
			margin: 0 auto;
		}
	</style>
</head>
<body>
	<div class="top_bar">
		<div class="container">
			小米商城
		</div>
	</div>

</body>
</html>